{% extends '_link.html' %}

{#导航栏#}
{% block navbar %}
    <nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark">
        <a class="navbar-brand" href="/admin">Movie Admin</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item {% if request.path == '/admin' %} active {% endif %} ">
                    <a class="nav-link" href="/admin">Movie <span class="sr-only">(current)</span></a>
                </li>

                <li class="nav-item {% if request.path == '/comment' %} active {% endif %} ">
                    <a class="nav-link" href="/admin_comment_list">Comment </a>
                </li>

                <li class="nav-item {% if request.path == '/user' %} active {% endif %} ">
                    <a class="nav-link" href="/admin_user_list">User </a>
                </li>
            </ul>


            <div style="display: flex">

                <div style="margin: 0 40px">
                    <ul style="margin-bottom: 0px">
                        <li class="nav-item dropdown" style="list-style:none">
                            <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
                               aria-expanded="false" style="color: white">
                                admin
                            </a>
                            <div class="dropdown-menu">
                                <a class="dropdown-item" href="/admin/logout">Logout</a>
                            </div>
                        </li>
                    </ul>
                </div>

                {#                <ul class="nav navbar-nav navbar-right">#}
                {#                    <li><a href="/chat/">Chat Room</a></li>#}
                {##}
                {#                    <li class="dropdown">#}
                {#                        <a href="#" class="dropdown" data-toggle="dropdown"#}
                {#                           role="button" aria-haspopup="true"#}
                {#                           aria-expanded="false">ss <span class="caret"></span></a>#}
                {#                        <ul class="dropdown-menu">#}
                {#                            <li><a href="#">Action</a></li>#}
                {#                            <li><a href="#">Another action</a></li>#}
                {#                            <li><a href="#">Something else here</a></li>#}
                {#                            <li role="separator" class="divider"></li>#}
                {#                            <li><a href="/user/logout/">Logout</a></li>#}
                {#                        </ul>#}
                {#                    </li>#}
                {#                </ul>#}
            </div>

        </div>
    </nav>
{% endblock %}